package com.yunxi.module.infra.api.logger;

import com.yunxi.framework.common.pojo.CommonResult;
import com.yunxi.module.infra.dto.logger.ApiErrorLogCreateReqDTO;
import com.yunxi.module.infra.service.logger.ApiErrorLogService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 提供 RESTful API 借口，给 Feign 调用
 * </p>
 *
 * @author lidy
 * @since 2024-05-17
 */
@RestController
@Validated
public class ApiErrorLogApiImpl implements ApiErrorLogApi {

    @Resource
    private ApiErrorLogService apiErrorLogService;

    @Override
    public CommonResult<Boolean> createApiErrorLog(ApiErrorLogCreateReqDTO reqDTO) {
        apiErrorLogService.createApiErrorLog(reqDTO);
        return CommonResult.success(true);
    }
}
